<script setup>
import { ref } from "vue";
const value = ref('')

const shortcuts = [
  {
    text: '最近一周',
    value: [new Date(), new Date()],
  },
  {
    text: '最近一个月',
    value: () => { 
      const end = new Date()
      const start = new Date()
      start.setMonth(start.getMonth() - 1)
      return [start, end]
    },
  },
  {
    text: '最近三个月',
    value: () => {
      const end = new Date()
      const start = new Date()
      start.setMonth(start.getMonth() - 3)
      return [start, end]
    },
  },
]
</script>
<template>
  <el-card>
    <search-header>
      <template #search>
        <el-date-picker
          v-model="value"
          type="daterange"
          unlink-panels
          range-separator="至"
          start-placeholder="请选择开始日期"
          end-placeholder="请选择结束日期"
          :shortcuts="shortcuts"
          @change="handlerChange"
         
        />
      </template>
    </search-header>
  </el-card>
</template>



<style lang="scss" scoped>
</style>